import request from '@/utils/request'

// 获取微客需求列表
export function pagingTaskMember(query) {
  return request({
    url: '/project/taskMember/pagingTaskMember',
    method: 'get',
    params: query
  })
}

// 微客需求 保存
export function updateTaskMember(query) {
  return request({
    url: '/project/taskMember/save',
    method: 'post',
    params: query
  })
}

// 校验录用人数 是否小于等于项目需求人数
export function checkInfoNum(taskId) {
  return request({
    url: '/project/taskMember/doCheckInfoNum',
    method: 'GET',
    params: { taskId }
  })
}

// 获取任务详情
export function getTaskInfoById(taskId) {
  return request({
    url: '/project/taskInfo/getTaskInfoById',
    method: 'GET',
    params: { taskId }
  })
}

// 获取任务详情
export function getContract(taskId, memberId) {
  const param = {
    taskId: taskId,
    memberId: memberId
  }
  return request({
    url: '/project/taskMember/getContract',
    method: 'GET',
    params: param
  })
}
